<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/


/*首页*/
Route::get('/', function () {
    return view('welcome');
});
/*退出登录*/
Route::get('/exit','Auth\LoginController@logout');
/*auth路由*/
Auth::routes();
/*后台路由*/
Route::group(['middleware' => ['web','auth','admin'],'prefix' => 'admin'],function()
{
    /*后台首页*/
    Route::get('/','Admin\IndexController@index');
    /*------------------------------------------------------------------------------*/
    /*栏目管理*/
    Route::resource('categroys','Admin\CategoryController');
    /*更新缓存*/
    Route::get('clearCategroys','Admin\CategoryController@clear');
    /*------------------------------------------------------------------------------*/
    /*帖子管理*/
    Route::resource('article','Admin\ArticleController');
    /*日志管理*/
    Route::resource('diary','Admin\DiaryController@clear');
    /*------------------------------------------------------------------------------*/
    /*markdown页面*/
    Route::get('markdown',function(){return view('admin.ifram.markdown');});
    /*markdown文章修改*/
    Route::get('markdownEdit/{id}','Admin\ArticleController@markdown');

    /*七牛配置页*/
    Route::get('QiniuConfig','Admin\QiniuController@config');
    /*七牛配置保存*/
    Route::post('QiniuConfig','Admin\QiniuController@save');
    /*七牛参数获取*/
    Route::get('QiniuList',function(){return makeQiniuList();});


});